package com.scenetec.ftp.config;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.net.ftp.FTP;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author shendunyuan@scenetec.com
 * @date 2018/12/19
 */
@Getter
@Setter
@Component
@ConfigurationProperties(ignoreUnknownFields = false, prefix = "ftp.client")
public class FtpClientProperties {

	/**
	 * ftp地址
	 */
	private String host;

	/**
	 * 端口号
	 */
	private Integer port = 21;

	/**
	 * 登录用户
	 */
	private String username;

	/**
	 * 登录密码
	 */
	private String password;

	/**
	 * 被动模式
	 */
	private boolean passiveMode = false;

	/**
	 * 编码
	 */
	private String encoding = "UTF-8";

	/**
	 * 连接超时时间(秒)
	 */
	private Integer connectTimeout;

	/**
	 * 缓冲大小
	 */
	private Integer bufferSize = 1024;

	/**
	 * 设置keepAlive
	 * 单位:秒  0禁用
	 */
	private Integer keepAliveTimeout = 0;

	/**
	 * 传输文件类型
	 */
	private Integer transferFileType = FTP.BINARY_FILE_TYPE;

}
